﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotNetExtensions.AspNet.Http
{
    public class MultipartFormDataItem
    {
        public string Name { get; set; }
        public object Value { get; set; }
        public MultipartFormDataType Type { get; set; }
        public string FileName { get; set; }
    }

    public enum MultipartFormDataType
    {
        Text = 1,
        Stream = 2
    }

    public class Header : KeyValue
    {
        public Header(string name, string value) : base(name, value) { }
    }

    public class HeaderCollection : ValueCollection<Header>
    {
        public HeaderCollection() : base()
        {

        }
        public HeaderCollection(List<Header> values) : base(values)
        {

        }
        public override void Add(Header item)
        {
            base.Add(item, x => x.Name == item.Name);
        }
    }
}
